#ifndef OPTIONS_H
#define OPTIONS_H

#include <generik/options.h>

struct options
: generik::options
{
	int nthreads;
	
	options(int& argc, char**& argv)
	: generik::options(argc, argv)
	, nthreads(1)
	{
		GENERIK_TRACER;
		run();
	}
	
	void usage(bool quit = true)
	{
		usage_("[<nthreads>]",
			"nthreads: number/limit of threads to use, default is 1",
		quit);
	}
	
	bool post()
	{
		if (_argc - optind == 1) nthreads = atoi(nextarg());
		return true;
	}
	
};

#endif

